The best way to determine whether or not you need to install Sound Manager 3.0 on a particular machine is to check for the presence of Sound Manager and determine its version programmatically. To do this, first ensure that the SndDispatch trap is implemented, and then call a routine called SndSoundManagerVersion(), which returns a number that indicates which Sound Manager version is present. This routine is documented in Inside Macintosh: Sound on pages 2-35 and 2-133. If the major version number returned is less than 3, then Sound Manager 3.0 is not installed.
The following code snippet shows how to implement TrapAvailable, which you can use in the trap test:
static Boolean TrapAvailable( short trapNum, short trapType) { return ( NGetTrapAddress(trapNum,trapType) != NGetTrapAddress(_Unimplemented, ToolTrap) ); }
This code snippet shows how to check the Sound Manager version:
Boolean IsSndMgrThree(void) { Boolean Is3orLater = false; NumVersion version; version = SndSoundManagerVersion(); if (version.majorRev >= 3) /*is this version 3.0 or later?*/ Is3orLater = true; return(Is3orLater); }
Sound Manager 3.0 also requires the Component Manager, which was not included
in the system software until System 7.1. If a machine has a pre-7.1 system, you
must also check for the presence of the Component Manager. You can use Gestalt
with the gestaltComponentMgr selector and check the value of the response
parameter, which, if the Component Manager is available, gives the Component
Manager version.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help